package rabid;

import java.io.IOException;
import java.util.HashMap;



public class Rabid {
	
	private Index index;
	private Cluster cluster;
	
	public Rabid() throws IOException {
		index = new Index();
	}

	public String[] query(String[] userQuery) {
		Query query = new Query(userQuery, index.getHashMap(), index.getCorpusFiles(), index.getCorpusSize());
		return query.getFiles();
	}
	
	public String[] similarTo(int fileIndex) {
		Similar similarTo = new Similar(index.getHashMap(), index.getCorpusSize(), index.getCorpusFiles(), fileIndex);
		return similarTo.getFiles();
	}
	public String[] browse(String[] userBrowse){
		Browse browse = new Browse(userBrowse, index.getHashMap(), index.getCorpusFiles(), index.getCorpusSize());
		return browse.getResults();
	}

	public Index getIndex() {
		return index;
	}
	

	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
